package com.barneyx.mshinfoplatform.entity.store;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.barneyx.mshinfoplatform.entity.AreaCommonEntity;
import com.gitee.sunchenbin.mybatis.actable.annotation.Column;
import com.gitee.sunchenbin.mybatis.actable.annotation.TableCharset;
import com.gitee.sunchenbin.mybatis.actable.annotation.TableEngine;
import com.gitee.sunchenbin.mybatis.actable.constants.MySqlCharsetConstant;
import com.gitee.sunchenbin.mybatis.actable.constants.MySqlEngineConstant;
import com.gitee.sunchenbin.mybatis.actable.constants.MySqlTypeConstant;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.extern.slf4j.Slf4j;

import java.util.ArrayList;
import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "msh_store_attr_list", autoResultMap = true)
@TableCharset(MySqlCharsetConstant.UTF8MB4)
@TableEngine(value = MySqlEngineConstant.MyISAM)
@Slf4j
public class StoreAttrEntity extends AreaCommonEntity {
    @TableId(value = "store_attr_id", type = IdType.INPUT)
    @Column(type = MySqlTypeConstant.BIGINT)
    private String StoreAttrId;

    @TableField("store_content")
    @Column(type = MySqlTypeConstant.LONGTEXT)
    private String StoreContent;

    @TableField(value = "store_albums", typeHandler = JacksonTypeHandler.class)
    @Column(type = MySqlTypeConstant.JSON)
    private List<String> StoreAlbums = new ArrayList<>();

    @TableField("store_notice")
    @Column(comment = "商家店铺公告")
    private String StoreNotice;
}
